﻿
//添加原告&被告表格
function addyg(tag) {
    var tbl = null;
    switch (tag) {
        case 1:
            tbl = document.getElementById("tblygzyr");
            break;
        case 2:
            tbl = document.getElementById("tblygfr");
            break;
        case 3:
            tbl = document.getElementById("tblygother");
            break;
        case 5:
            tbl = document.getElementById("tblbgzyr");
            break;
        case 6:
            tbl = document.getElementById("tblbgfr");
            break;
        case 7:
            tbl = document.getElementById("tblbgother");
            break;
        default:
            break;
    }

    var newtbl = tbl.cloneNode(true);
    newtbl.id = newtbl.id + "_" + tag.toString();
    var el = null;
    if (tag < 5) {
        el = document.getElementById("liyg");
    } else {
        el = document.getElementById("libg");
    }
    el.appendChild(newtbl);
}

//删除添加的表格
function deltbl(el) {
    if (confirm("您确定要删除吗？")) {
        var eTbl = el.parentNode.parentNode.parentNode.parentNode;
        eTbl.removeNode(true);
    }
}